package cn.edu.glut.entity;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.OneToMany;

import com.fasterxml.jackson.annotation.JsonBackReference;

import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

/**
 * 
 * @author Caizhfy
 * @email caizhfy@163.com
 * @createTime 2017年12月6日
 * @description 老师 
 *
 */
@Getter
@Setter
@NoArgsConstructor
@ToString(callSuper = true, exclude = "subjects")
@EqualsAndHashCode(callSuper = true, exclude = "subjects")
@Entity
public class Teacher extends User {
	private static final long serialVersionUID = -6729037468126453685L;

	private String contact; // 联系方式
	private String description; // 描述
	@JsonBackReference
	@OneToMany(mappedBy = "teacher")
	private List<Subject> subjects;

	public Teacher(String id){
		super();
		this.id = id;
	}
}
